-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n: integration with Angular templates #40
i18n: integration with Angular templates #40
Conversation
b15d430
to
e737d81
Compare
contents = property(_get_contents, Bundle._set_contents) | ||
|
||
|
||
class AngularGettextFilter(Filter): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this will be added to Invenio-Assets or I18N and that this is just proof-of-concept?
name = 'angular-gettext' | ||
|
||
def output(self, _in, out, **kwargs): | ||
out.write("angular.module('tindThemeTranslations', ['gettext']).run(['gettextCatalog', function (gettextCatalog) {") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewm89 we should find a way how to make tindThemeTranslations
configurable from Bundle
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jirikuncar is there are way to get the module name? We can then use this to replace 'tindTheme'. It should then be easier to do the import of the translations in the angular app based on the module name + 'Translations'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check if there is something usable in self
or kwargs
.
|
||
def input(self, _in, out, **kwargs): | ||
import ipdb | ||
ipdb.set_trace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the PR is still a WIP :)
89fb8c0
to
2629357
Compare
Depends on inveniosoftware/invenio-assets#51 |
932b837
to
ab0fafe
Compare
Since Invenio-Assets v1.0.0b4 is out we have green light on Travis. More reliable language code detection will come with inveniosoftware/invenio-assets#54. Please note that in order to fully plug translations, there is a work needed on language selector in inveniosoftware/invenio-i18n#34 probably by setting a cookie with selected language that will be shared by frontend and backend. |
LGTM |
ab0fafe
to
333331a
Compare
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
* Adds new bundle with translations for Angular application. (addresses inveniosoftware/invenio-i18n#34) Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
333331a
to
e67c165
Compare
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
@lnielsen finally we have a green light 🎉 |
Signed-off-by: Jiri Kuncar jiri.kuncar@cern.ch